<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>编辑菜单-PIGS后台系统</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="/static/res/layui/css/layui.css" media="all"/>
        <link rel="stylesheet" href="/static/res/hint/css/message.css">

        <style type="text/css">
            .layui-form-item .layui-inline {
                width: 33.333%;
                float: left;
                margin-right: 0;
            }
            @media (max-width: 1240px) {
                .layui-form-item .layui-inline {
                    width: 100%;
                    float: none;
                }
            }
        </style>
    </head>
    <body class="childrenBody">
        <form class="layui-form" style="width:80%;">
            <br/>
            <input type="text" value="" name="menuId" class="layui-input layui-hide menuId">

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">上级菜单</label>
                    <div class="layui-input-block">
                        <div id="menuList" class="xm-select-demo">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">菜单类型</label>
                    <div class="layui-input-block menuType">
                        <input type="radio" name="menuType" value="M" title="目录" checked>
                        <input type="radio" name="menuType" value="C" title="菜单">
                        <input type="radio" name="menuType" value="F" title="按钮">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label is-required" >菜单名称</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input menuName" name="menuName"
                               placeholder="请输入菜单名称" maxlength="20"
                               autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">权限标识</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input perms" name="perms"
                               placeholder="比如 role:queryRoleInfo"
                               maxlength="50" autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">请求地址</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input url" name="url"
                               placeholder="比如 role/queryRoleInfo"
                               maxlength="50" autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">打开方式</label>
                    <div class="layui-input-block">
                        <select id="target" name="target">
                            <option value="menuItem">页签</option>
                            <option value="menuBlank">新窗口</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label is-required">显示排序</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input orderNum" name="orderNum"
                               maxlength="5" autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">图标</label>
                <div class="layui-input-block">
                    <input type="text" id="iconPicker" value='#' name="icon"
                           class="hide icon">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">菜单状态</label>
                    <div class="layui-input-block">
                        <select name="state" class="state" lay-filter="permissionState">
                            <option value="0">显示</option>
                            <option value="1">隐藏</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input remark" name="remark"
                               placeholder=""
                               maxlength="10" autocomplete="off">
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-primary" lay-submit="" lay-filter="menuEdit">立即提交</button>
                </div>
            </div>
        </form>

        <script type="text/javascript" src="/static/view/js/jquery.min.js"></script>
        <script type="text/javascript" src="/static/res/layui/layui.js"></script>
        <script type="text/javascript" src="/static/res/hint/js/message.js"></script>
        <script type="text/javascript" src="/static/view/page/menu/js/xm-select.js"></script>
        <script type="text/javascript" src="/static/view/page/menu/js/menu-edit.js"></script>
    </body>
</html>
